import React from 'react';
import { View } from 'react-native';
import PropTypes from 'prop-types';
import Item from '../Item';

const List = ({ readyList, getPlanList }) => (
    <View>
        {
            readyList.map(ojbItem => (
                <Item ojbItem={ojbItem} key={ojbItem.planid} getPlanList={getPlanList} />
            ))
        }
    </View>
);
List.defaultProps = {
    readyList: [],
    getPlanList: () => {},
};
List.propTypes = {
    readyList: PropTypes.arrayOf(PropTypes.any),
    getPlanList: PropTypes.func,
};
export default List;
